package com.zxb.rocketmq.springboot_rocketmq_demo.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(consumerGroup = "transaction-group", topic = "transaction-str")
public class TransactionConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String str) {
        log.info("===>"+str);
    }
}
